#ifndef _MIXP_CORE_H
#define _MIXP_CORE_H

#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>

#define MIXP_OK 0
#define MIXP_ERROR -1
#define MIXP_LINEFEED "\n"

#define MALLOC(type) (type *)malloc(sizeof(type))
#define FREE(obj)       \
    do                  \
    {                   \
        if (obj)        \
        {               \
            free(obj);  \
            obj = NULL; \
        }               \
    } while (0)

typedef intptr_t mixp_int_t;
typedef uintptr_t mixp_uint_t;
typedef intptr_t mixp_flag_t;

typedef struct darray darray_t;
typedef struct hash hash_t;
typedef struct list_head list;

#endif